/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package Wires.impl;

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.m2m.atl.engine.AtlEMFModelHandler;

import Wires.OutputActualParameter;
import Wires.OutputFormalParameter;
import Wires.WiresPackage;
import Wires.exep.TypeNotFoundException;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Output Actual Parameter</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * </p>
 *
 * @generated
 */
public class OutputActualParameterImpl extends ActualParameterImpl implements OutputActualParameter {
	/***************************************************/
	/***************** Modifications *******************/	
	
	public void newModel(){
		if ((OutputFormalParameter)this.getType() == null)
			throw new TypeNotFoundException(this);
		
		String modelName = ((OutputFormalParameter)this.getType()).getName();
//		String mmName = ((OutputFormalParameter)this.getType()).getTypeName();
//		String containerName = ((Transformation)this.eContainer).getName();
		AtlEMFModelHandler modelHandler = (AtlEMFModelHandler) AtlEMFModelHandler.getDefault(AtlEMFModelHandler.AMH_EMF);
		this.model = modelHandler.newModel(modelName, URI.createFileURI("temp").toFileString(), this.metamodel);		
	}
	
	/**************** Modifications End ****************/
	/***************************************************/
	
	
	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected OutputActualParameterImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return WiresPackage.Literals.OUTPUT_ACTUAL_PARAMETER;
	}

} //OutputActualParameterImpl
